<script setup>

import ImageCropper from "../../components/image/ImageCropper.vue";
import {ref} from "vue";

const imageUrl = ref('https://tse1-mm.cn.bing.net/th/id/OIP-C.Ax4NjkyOdGGBxgQQmEiD8AHaEw?w=253&h=181&c=7&r=0&o=5&dpr=2&pid=1.7');
const getBase64 = (base64) => {
  console.log('获取到的图片base64：', base64);
  imageUrl.value = base64;
};
</script>

<template>
  <div class="img-box">
    <image-cropper ref="imageCropperRef" :url="imageUrl" @get-base64="getBase64"/>
  </div>
</template>

<style scoped>
.img-box {
  padding: 100px;
}
</style>